package chapter02.item09.eightninetest;

import java.io.Closeable;
import java.io.File;
import java.io.IOException;

/**
 * @author zhaoyuqiang
 * @date 2021年09月29日 11:31
 * @description 实现AutoClosed接口
 */
public class AutoClosedTest implements Closeable {
        //implements AutoCloseable{

    public String hello(){
        return "nihaoya!";
    }

    @Override
    public void close() throws IOException {
        System.out.println("资源被回收啦");
    }
}
